package org.example.controller;

import org.example.config.AlipayConfig;
import org.example.pojo.AlipayBean;
import org.example.pojo.Result;
import org.example.service.AlipayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;

@RestController
@RequestMapping("/pay")
public class PayController {
    @Autowired
    private AlipayService alipayService;
    @Autowired
    AlipayConfig alipayConfig;
    @PostMapping("/alipay")
    public Result alipay(@RequestBody AlipayBean alipayBean){
        String result = alipayService.alipay(alipayBean);
        System.out.println(result);
        return Result.success(result);
    }
}